class dnsmasq($dnsmasqinterfaces, $mydomainname) {

  include srv_dnsmasq
  
  file { "/etc/dnsmasq.conf":
    owner => "root",
    group => "root",
    mode => 644,
    content => template("dnsmasq/etc-dnsmasq.conf"),
    notify => Service["dnsmasq"],
  }

  file { "/etc/hosts":
    owner => "root",
    group => "root",
    mode => 644,
    content => template("dnsmasq/etchosts"),
    notify => Service["dnsmasq"],
  }
  
}

class srv_dnsmasq {
  package { "dnsmasq":
    ensure => installed,
  }
  
  service { "dnsmasq":
    ensure => running,
    hasstatus => "true",
    hasrestart => "true",
    require => Package["dnsmasq"],
  }
  
}
